<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <policy context="default">
    <!-- Do not allow owning this name to regular users -->
    <deny own="org.freedesktop.SystemToolsBackends"/>

    <!-- Uncomment this if you want to test configuration modules with a harmless user -->
    <!--
    <allow own="org.freedesktop.SystemToolsBackends.GroupsConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.HostsConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.IfacesConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.NFSConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.NTPConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.ServicesConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.SMBConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.TimeConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.UserConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.UsersConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.Platform"/>
    <allow send_interface="org.freedesktop.SystemToolsBackends.Platform" send_member="getPlatform"/>
    -->

    <!-- configuration modules can't be accessed directly... -->
    <deny send_destination="org.freedesktop.SystemToolsBackends"/>
    <deny send_destination="org.freedesktop.SystemToolsBackends.Platform"/>
    <deny send_destination="org.freedesktop.SystemToolsBackends"/>
  </policy>

  <policy user="0">
    <!-- only root is allowed to run the dispatcher -->
    <allow own="org.freedesktop.SystemToolsBackends"/>

    <!-- also allow it to own the configuration modules -->
    <allow own="org.freedesktop.SystemToolsBackends.GroupsConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.HostsConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.IfacesConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.NFSConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.NTPConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.ServicesConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.SMBConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.TimeConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.UserConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.UsersConfig"/>
    <allow own="org.freedesktop.SystemToolsBackends.Platform"/>

    <!-- be able to speak to configuration modules,
         so any message to them has to go through the dispatcher -->
    <allow send_destination="org.freedesktop.SystemToolsBackends"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.Platform"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.GroupsConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.HostsConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.IfacesConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.NFSConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.NTPConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.ServicesConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.SMBConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.TimeConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.UserConfig"/>
    <allow send_destination="org.freedesktop.SystemToolsBackends.UsersConfig"/>
  </policy>
  <policy group="admin">
    <!-- be able to speak to the dispatcher -->
    <allow send_destination="org.freedesktop.SystemToolsBackends"/>
  </policy>
</busconfig>
